<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>代理资料</title>
	<link href="../css/public.css" rel="stylesheet"/>
	<link href="../css/main.css" rel="stylesheet"/>
	<link href="../css/style.css" rel="stylesheet"/>
	<link href="../css/agent.css?v=1" rel="stylesheet"/>

	<script src="./js/jquery-1.9.1.js"></script>

	<script src="../js/swiper.min.js"></script>
	<script src="../js/mobile-util.js"></script>
	<script src="../js/public.js"></script>
	<script src="../js/jquery.cookie.js"></script>
    <script src="../../mifiadmin/js/common.js"></script>

	<script>
		/*获取url参数*/
		function getUrlParam(name) {
			var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
			var r = window.location.search.substr(1).match(reg);  //匹配目标参数
			if (r != null) return unescape(r[2]); return null; //返回参数值
		}

		/*获取url参数end*/
	</script>

	<style>
		.settininput{
			padding: 0;
		}
	</style>

</head>
<body >

<header class="mui-bar mui-bar-nav indexheader bluebg flex">
	<div class="headerlogo" onclick="back()">
		<i class="iconfont backbtn">&#xe602;</i>
	</div>

	<div class="headertitle">
		<p>代理资料</p>
	</div>

	<div class="headerright timeright hide">
		<p class="timepbox iconfont">&#xe6d9;</p>
	</div>

</header>

<main class="agentbox">
	<div class="settingbox">
		<div class="floor my p setting">
			<div class="content">
				<div class="floor list7">
					<div class="myorder p">
						<div class="content30">
							<a href="javascript:void(0)">
								<div class="order">
									<div class="fl">
										<span>姓名</span>
									</div>
									<div class="fr">
										<p id="nickname" name="nickname" class="settininput"></p>

									</div>
								</div>
							</a>
						</div>
					</div>

					<div class="myorder p">
						<div class="content30">
							<a href="javascript:void(0)">
								<div class="order">
									<div class="fl">
										<span>性别</span>
									</div>
									<div class="fr sexbox" style="position: relative;display: flex;">

									</div>
								</div>
							</a>
						</div>
					</div>

					<div class="myorder p">
						<div class="content30">
							<a href="javascript:void(0)">
								<div class="order">
									<div class="fl">
										<span>手机</span>
									</div>
									<div class="fr">
										<p   id="mobile"  name="mobile" class="settininput"></p>
									</div>
								</div>
							</a>
						</div>
					</div>

					<div class="myorder p">
						<div class="content30">
							<a href="javascript:void(0)">
								<div class="order">
									<div class="fl">
										<span>QQ号</span>
									</div>
									<div class="fr">
										<p id="qqcode" name="mobile"  class="settininput"></p>
									</div>
								</div>
							</a>
						</div>
					</div>

					<div class="myorder p">
						<div class="content30">
							<a href="javascript:void(0)">
								<div class="order">
									<div class="fl">
										<span>密码</span>
									</div>
									<div class="fr">
										<p id="qqpsw" name="qqpsw"  class="settininput"></p>
									</div>
								</div>
							</a>
						</div>
					</div>

					<div class="myorder p">
						<div class="content30">
							<a href="javascript:void(0)">
								<div class="order">
									<div class="fl">
										<span>身份证号</span>
									</div>
									<div class="fr">
										<p id="idcard" name="mobile"  class="settininput"></p>
									</div>
								</div>
							</a>
						</div>
					</div>

					<div class="myorder p">
						<div class="content30">
							<a href="javascript:void(0)">
								<div class="order">
									<div class="fl">
										<span>银行卡类型</span>
									</div>
									<div class="fr">
										<p id="bankname" name="mobile"  class="settininput"></p>
									</div>
								</div>
							</a>
						</div>
					</div>

					<div class="myorder p">
						<div class="content30">
							<a href="javascript:void(0)">
								<div class="order">
									<div class="fl">
										<span>银行支行</span>
									</div>
									<div class="fr">
										<p  id="banknamevice" name="banknamevice"  class="settininput"></p>
									</div>
								</div>
							</a>
						</div>
					</div>

					<div class="myorder p">
						<div class="content30">
							<a href="javascript:void(0)">
								<div class="order">
									<div class="fl">
										<span>银行卡号</span>
									</div>
									<div class="fr">
										<p  id="bankcard" name="mobile" class="settininput"></p>
									</div>
								</div>
							</a>
						</div>
					</div>

				</div>

			</div>
		</div>
	</div>
</main>



</body>


<script>


	var tooken=$.cookie("tooken");


	if(tooken==null||tooken==undefined||tooken==""){

		window.location.href="../agent/login.html";

	}else {
		var agent_qq=getUrlParam("agent_qq");

		// var url="http://qt.hiberbest.com";
		//var url="http://192.168.0.132:69";

		var geturl=url+ "/Admin/agentapi/getAgentByqq?agent_qq="+agent_qq;

		$.ajax({
			type: 'get',
			dataType: "json",
			url: geturl,
			success: function (data) {
				console.log(data);
				var suc=data.success;
				if(suc.code == 4007){
					alert(suc.message);
					window.location.href="login.html";
				}else if(suc.code == 4011){
					alert(suc.message);
					window.location.href="login.html";
				}else if(suc.code == 4000){
					var agent=data.agentinfo;


					if(agent.sex== 1){
						$('.sexbox').html("男");
					}else if(agent.sex== 0){
						$('.sexbox').html("女");
					}

					$('#mobile').html(agent.mobile);
					$('#qqcode').html(agent.agent_qq);
					$('#bankcard').html(agent.bankcard);
					$('#bankname').html(agent.bankname);
					$('#nickname').html(agent.agent_name);
					$('#idcard').html(agent.idcard);
					$('#qqpsw').html(agent.password);
					$('#banknamevice').html(agent.branch);






				}

			},error:function(data){
				console.log("请检查您的网络");
			}
		});

	}


</script>

</html>
